package com.dldata.display.service.System;

import com.dldata.display.entity.SysDtwyZbbEntity;
import com.dldata.display.repository.System.SysDtwyZbbDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.transaction.annotation.Transactional;

import java.sql.Timestamp;
import java.util.List;

/**
 * Created by 吴岳峰 on 2017/07/11.
 */
@Component
@Transactional
public class SysDtwyZbbService {

    @Autowired
    private SysDtwyZbbDao sysDtwyZbbDao;

    public List<SysDtwyZbbEntity> findByKsMonth(Timestamp s, Timestamp e,String ks){
        return sysDtwyZbbDao.findByKsMonth(s,e,"%"+ks+"%");
    }

    public SysDtwyZbbEntity findOne(String id ){
        return sysDtwyZbbDao.findOne(id);
    }

    public void save(SysDtwyZbbEntity s){
        sysDtwyZbbDao.save(s);
    }

    public void delete(String id ){
        sysDtwyZbbDao.delete(id);
    }

}
